import {DesignerLayoutSymbol, useContext} from '@pg/prototypes'
import { IDesignerLayoutContext } from '../types'
import { globalThisPolyfill } from '@designable/shared'

export const useLayout = (): IDesignerLayoutContext => {
  return (
    globalThisPolyfill['__DESIGNABLE_LAYOUT__'] ||
    useContext(DesignerLayoutSymbol)
  )
}
